package com.smalluz.ad.modules.common.result;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.smalluz.ad.modules.common.util.json.JacksonUtils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * @author biteam
 * @Title: BaseResult
 * @Description: 基础结果类
 * @site http://www.smalluz.com/
 * @email 510711793@qq.com
 * @date 2022-06-12 21:20
 */
@SuperBuilder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseResult implements Serializable {

    private static final long serialVersionUID = -1205251018660608446L;

    private Integer code;

    private String message;

    @JsonProperty("request_id")
    private String requestId;
    
    /**转换成Json**/
    public String toJson() {
        return JacksonUtils.bean2Jsn(this);
    }

}
